package com.wbhz.service;

import java.util.List;

import com.wbhz.entity.Collect;
import com.wbhz.entity.Like;
import com.wbhz.entity.PageBean;
import com.wbhz.entity.Post;
import com.wbhz.entity.Reply;
import com.wbhz.entity.Tab;
import com.wbhz.entity.Vip;

public interface PostService {
	Post selectPostDetail(int postId);
	
	int insertPost(Post post);
	
	List<Tab> selectTab();
	
	PageBean<Post> selectPostByPage(String title, int currentPage);
	
	List<Post> selectPostByUId(int userId);	// 用户中心显示
	List<Collect> selectUserCollect(int userId);	// 用户中心显示: 收藏表信息
	List<Post> selectUserCollectPost(int userId);	// 用户中心显示: 收藏的帖子信息
	
	List<Tab> selectTabByPost();
	
	Vip selectVip(int userId);
	
	int updateStickPost(int postId, String stickOrNot);
	
	int updatePostStatus(int postId);
	
	int insertReply(Reply reply);
	
	PageBean<Reply> selectReplyByPage(int replyPostId, int currentPage);
	
	int updateReplyStatus(int replyId);
	
	int addOrSubReplyLike(int likePostId, int likePostUserId, int likeReplyId, int likeFromUserId, int likeByUserId);
	
	int updateReplyLike(int replyId, int flag);
	
	int insertReport(int postId, int postUserId, int reportUserId, String postTitle);
	
	Integer selectReport(int postId);
	
	Integer selectReportByUId(int postId, int reportUserId);
	
	int addOrSubCollect(int postId, int postUserId, int userId);
	
	String selectCollect(int postId, int userId);	// 是否收藏
	
	int insertMsg(int fromUserId, int byUserId, String msgName, String msgContent, String msgStatus);
	
	int addPostBrowse(int postId);
	
	int addPostReply(int postId);
	
	List<Like> selectLikeByUserId(int userId, int postId);
	Integer[] selectNotLike(int userId, int postId);
	
	String selectUserNameByPid(int postId);
	
	List<Post> selectPostByCur(int flag);
	
	int updateUserMoney(int replyFromUserId, int postReward);
	
	int selectPostUserId(int postId);
}
